import request from '@/utils/request'

// 仓库表格分页查询
export const getWarehousePaging = (params: any) =>
  request({
    url: '/warehouse/page',
    method: 'get',
    params
  })

// 改变仓库状态--停用/启用
export const changeWarehouseStatus = (params: any) =>
  request({
    url: '/warehouse',
    method: 'put',
    data: { ...params }
  })

// 删除仓库
export const deleteWarehouse = (params: any) =>
  request({
    url: '/warehouse',
    method: 'delete',
    params
  })

// 查询所有的仓库
export const getAllWarehouse = (params:any) =>
  request({
    url: '/warehouse/list',
    method: 'get',
    params
  })
